<!DOCTYPE html>
<html class="x-admin-sm">
    <head>
        <meta charset="UTF-8">
        <title>欢迎页面-yun超市</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="./css/font.css">
        <link rel="stylesheet" href="./css/xadmin.css">
        <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    </head>
    <body>
    <div class="x-body">
        <blockquote class="layui-elem-quote">欢迎管理员：
            <span class="x-red" id="realName"></span>
            </span><span id="nowTime"></span>
        </blockquote>
        <fieldset class="layui-elem-field">
            <legend>数据统计</legend>
            <div class="layui-field-box">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-carousel x-admin-carousel x-admin-backlog" lay-anim="" lay-indicator="inside" lay-arrow="none" style="width: 100%; height: 90px;">
                                <div carousel-item="">
                                    <ul class="layui-row layui-col-space10 layui-this">
                                        <li class="layui-col-xs2">
                                            <a href="javascript:;" class="x-admin-backlog-body">
                                                <h3>会员数</h3>
                                                <p>
                                                    <cite ><span id="userNum"></span></cite></p>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs2">
                                            <a href="javascript:;" class="x-admin-backlog-body">
                                                <h3>商品数</h3>
                                                <p>
                                                    <cite><span id="goodNum"></span></cite></p>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs2">
                                            <a href="javascript:;" class="x-admin-backlog-body">
                                                <h3>今日交易额</h3>
                                                <p>
                                                    <cite><span id="todaySale"></span></cite></p>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs2">
                                            <a href="javascript:;" class="x-admin-backlog-body">
                                                <h3>总交易额</h3>
                                                <p>
                                                    <cite><span id="totalSale"></span></cite></p>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs2">
                                            <a href="javascript:;" class="x-admin-backlog-body">
                                                <h3>访问量</h3>
                                                <p>
                                                    <cite><span>99+</span></cite></p>
                                            </a>
                                        </li>

                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </fieldset>
        <fieldset class="layui-elem-field">
            <legend>系统通知</legend>
            <div class="layui-field-box">
                <table class="layui-table" lay-skin="line">
                    <tbody>
                        <tr>
                            <td >
                                <a class="x-a" href="">新版商品管理系统 2.0上线了</a>
                            </td>
                        </tr>
                        <tr>
                            <td >
                                <a class="x-a" href="" >交流qq:(10001)</a>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </fieldset>
        <fieldset class="layui-elem-field">
            <legend>系统信息</legend>
            <div class="layui-field-box">
                <table class="layui-table">
                    <tbody>
                        <tr>
                            <th>商品管理系统版本</th>
                            <td>1.0.180420</td></tr>
                        <tr>
                            <th>服务器地址</th>
                            <td>www.shopping.com</td></tr>
                        <tr>
                            <th>操作系统</th>
                            <td>WINNT</td></tr>
                        <tr>
                            <th>运行环境</th>
                            <td>Apache/2.4.23 (Win32) OpenSSL/1.0.2j mod_fcgid/2.3.9</td></tr>
                        <tr>
                            <th>JDK版本</th>
                            <td>1.8</td></tr>
                        <tr>
                            <th>Tomcat版本</th>
                            <td>9.0</td></tr>
                        <tr>
                            <th>MYSQL版本</th>
                            <td>8.0</td></tr>
                        <tr>
                            <th>ThinkPHP</th>
                            <td>5.0.18</td></tr>
                        <tr>
                            <th>上传附件限制</th>
                            <td>2M</td></tr>
                        <tr>
                            <th>执行时间限制</th>
                            <td>30s</td></tr>
                        <tr>
                            <th>剩余空间</th>
                            <td>86015.2M</td></tr>
                    </tbody>
                </table>
            </div>
        </fieldset>
        <fieldset class="layui-elem-field">
            <legend>开发团队</legend>
            <div class="layui-field-box">
                <table class="layui-table">
                    <tbody>
                        <tr>
                            <th>版权所有</th>
                            <td>xiaoyangxu
                                <!--<a href="http://x.xuebingsi.com/" class='x-a' target="_blank">访问官网</a></td>-->
                        </tr>
                        <tr>
                            <th>开发者</th>
                            <td>huachneyu</td></tr>
                    </tbody>
                </table>
            </div>
        </fieldset>
        <blockquote class="layui-elem-quote layui-quote-nm">感谢layui,百度Echarts,jquery,本系统由x-admin提供技术支持。</blockquote>
    </div>
        <script>
            setInterval(function(){
            var date = new Date();
            var year = date.getFullYear();    //获取当前年份
            var mon = date.getMonth()+1;      //获取当前月份
            var da = date.getDate();          //获取当前日

            var h = date.getHours();          //获取小时
            var m = date.getMinutes();        //获取分钟
            var s = date.getSeconds();        //获取秒
            var d = document.getElementById('nowTime');
            d.innerHTML='    !当前时间:'+year+'-'+mon+'-'+da+' '+h+':'+m+':'+s;
        },1000)
            $(function(){
                $.ajax({
                    type: "Get",
                    url: "http://localhost:8080/admin/welcome",
                    charset: "utf-8",
                    success: function (data) {
                        console.log(data)
                        $("#userNum").text(data.userNum);
                        $("#goodNum").text(data.goodNum);
                        $("#totalSale").text(data.totalSale);
                        $("#todaySale").text(data.todaySale);

                    },

                });
                $.ajax({
                    type: "Get",
                    url: "http://localhost:8080/admin/login/info",
                    charset: "utf-8",
                    success: function (data) {
                        console.log(data)
                        $("#realName").text(data.realName);
                    },

                })
            });
            var _hmt = _hmt || [];
            (function() {
              var hm = document.createElement("script");
              hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
              var s = document.getElementsByTagName("script")[0];
              s.parentNode.insertBefore(hm, s);
            })();


        </script>
    </body>
</html>